This gives an opportunity for implementations to handle these events
differently, instead of hardcoding the WM-triggering behavior.
gtk_window_event() only forwards events for WM management if the event
widget is not the window (ie. caught when bubbling), so is safe to be
called here without triggering gtk_window_handle_wm_event() twice.
This commit is an adaption to master of
https://bugzilla.gnome.org/show_bug.cgi?id=736702#c1 by Cosimo Cecchi.
if (!GTK_IS_WINDOW (widget))
return GDK_EVENT_PROPAGATE;
+ if (event->type != GDK_BUTTON_PRESS && event->type != GDK_BUTTON_RELEASE &&
+ event->type != GDK_MOTION_NOTIFY && event->type != GDK_TOUCH_BEGIN &&
+ event->type != GDK_TOUCH_END && event->type != GDK_TOUCH_UPDATE)
+ return GDK_EVENT_PROPAGATE;
+
+ if (gtk_widget_event (widget, event))
+ return GDK_EVENT_STOP;
+
return gtk_window_handle_wm_event (GTK_WINDOW (widget), event);
}